<?php
/**
 * Contains the Application_Form_Status_flag class
 * @author Alexander Loewen
 * @version 0.1
 */

/**
 * handles the Status_flag form
 * @package forms
 */
class Application_Form_Statusflag extends Zend_Form
{
    /**
     * init sets the form elements
     */
    public function init()
    {
	$this->setMethod('post');

	/** 
	 * adds the max_caresits element
	 */
	$this->addElement('text', 'max_caresits', array(
	    'label'      => 'Maximale Anzahl gleichzeitiger Betreuungsplätze*: ',
	    'required'   => true,
	    'filters'    => array('StringTrim'),
	    'validators' => array(
		array('validator' => 'Int'),
		array('validator' => 'NotEmpty')
	    )
	));

	/**
	 * adds the max_children_under_age_1 element
	 */
	$this->addElement('text', 'max_children_under_age_1', array(
	    'label'      => 'Maximale Anzahl an Betreuungsplätzen für Kinder unter 1 Jahr*: ',
	    'required'   => true,
	    'filters'    => array('StringTrim'),
	    'validators' => array(
		array('validator' => 'Int'),
		array('validator' => 'NotEmpty')
	    )
	));
	
	/**
	 * adds the max_caredays_for_children_under_age_1 element
	 */
	$this->addElement('text', 'max_caredays_for_children_under_age_1', array(
	    'label'      => 'Maximale Anzahl an Betreuungstage pro Woche für Kinder unter 1. Jahr*: ',
	    'required'   => true,
	    'filters'    => array('StringTrim'),
	    'validators' => array(
		array('validator' => 'Int'),
		array('validator' => 'NotEmpty'),
		array('validator' => new Zend_Validate_Between(array('min' => 1, 'max' => 7)))
	    )
	));

	/**
	 * adds the max_caredays_for_children_over_age_1 element
	 */
	$this->addElement('text', 'max_caredays_for_children_over_age_1', array(
	    'label'      => 'Maximale Anzahl an Betreuungstage pro Woche für Kinder über 1. Jahr*: ',
	    'required'   => true,
	    'filters'    => array('StringTrim'),
	    'validators' => array(
		array('validator' => 'Int'),
		array('validator' => 'NotEmpty'),
		array('validator' => new Zend_Validate_Between(array('min' => 1, 'max' => 7)))
	    )
	));
	
	/**
	 * adds the max_carehours_per_week element
	 */
	$this->addElement('text', 'max_carehours_per_week', array(
	    'label'      => 'Maximale Anzahl an Betreuungsstunden pro Kind/Woche*: ',
	    'required'   => true,
	    'filters'    => array('StringTrim'),
	    'validators' => array(
		array('validator' => 'Int'),
		array('validator' => 'NotEmpty'),
		array('validator' => new Zend_Validate_Between(array('min' => 1, 'max' => 168)))
	    )
	));
	
	/**
	 * adds the daily_caretime_from element
	 */
	$this->addElement('text', 'daily_caretime_from', array(
	    'label'      => 'Öffnungszeit Kinderbetreuung von*: ',
	    'required'   => true,
	    'filters'    => array('StringTrim')
	    )
	);
	
	/**
	 * adds the daily_caretime_to element
	 */
	$this->addElement('text', 'daily_caretime_to', array(
	    'label'      => 'Öffnungszeit Kinderbetreuung bis*: ',
	    'required'   => true,
	    'filters'    => array('StringTrim')
	    )
	);

	/**
	 * adds the submit button
	 */
	$this->addElement('submit', 'submit', array(
	    'ignore'   => true,
	    'label'    => 'Ändern',
	));
    }
}
